import Vue from 'vue';
import App from './App.vue';
import router from './router';
import store from './store';
import VueI18n from 'vue-i18n';

import { validatePlus } from './utils/validate';

Vue.config.productionTip = false;

// 样式初始化
import 'normalize.css/normalize.css';

// element-ui
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
Vue.use(ElementUI);

// v-viewer
import Viewer from 'v-viewer';
import 'viewerjs/dist/viewer.css';
Vue.use(Viewer);

// validator
Vue.prototype.$validator = validatePlus;

// i18n
Vue.use(VueI18n);
const i18n = new VueI18n({
	locale: 'zh',
	messages: {
		zh: require('./lang/zh.js'), //中文
		en: require('./lang/en.js'), //英文
		ja: require('./lang/ja.js'), //日语
	},
});

new Vue({
	router,
	store,
	i18n,
	render: (h) => h(App),
}).$mount('#app');
